package com.cgy.study.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 * @author 曹光友 2018/6/14 15:40
 */
/*@ResponseBody
@Controller*/
@RestController
public class HelloWorldController {

    @RequestMapping("/hello")
    public List<Test> helloWorld() {

        List<Test> testList = new ArrayList<Test>();
        Test test = new Test();
        test.setId(0);
        test.setName("test0");

        testList.add(test);

        Test test1 = new Test();
        test1.setId(1);
        test1.setName("test1");
        testList.add(test1);
        return testList;
    }
}